#include <iostream>
#include <string>
#include <algorithm>
#include <time.h>
#include <vector>

using namespace std;

//颜色划分
class Solution {
public:
    void sortColors(vector<int>& nums)
    {
        int n = nums.size();
        int left = -1;
        int right = n;
        int cur = 0;
        while (cur < right)
        {
            int tmp = nums[cur];
            if (tmp == 0)
            {
                swap(nums[++left], nums[cur++]);
            }
            else if (tmp == 1)
            {
                cur++;
            }
            else if (tmp == 2)
            {
                swap(nums[--right], nums[cur]);
            }
        }
    }
};

int main()
{
	return 0;
}